{template 'header'}
    <!--当前位置-->
    <div class="location layout960">
	    <!--{template 'location', MODULE_NAME}-->
    </div>
    <!--当前位置 end-->
    <!--主体部分-->
    <div class="cooper-hd layout960 fn-clear">
    	<h2 class="fn-left">车主服务</h2>
	    <a class="join" href="{url('shop/flow')}">服务商家加盟</a>
    </div>
    <div class="layout960">
    	<!--图文说明 start-->
        <div class="cooper-show mt10 fn-clear">
        	<div class="cooper-pics fn-left">
            	<div id="J_Kinslideshow" class="big" style="visibility: hidden">
		            {loop $albums $k $v}
		            <a href="javascript:void(0);return false;"><img src="{$v[thumb]}" width="645" height="325"></a>
		            {/loop}
	            </div>
            </div>
            <div class="sell-show-intro fn-right" style="height:313px;overflow:hidden;">
                <h3>{$item['shopname']} {if $item[nickname]}({$item[nickname]}){/if}</h3>
	            {if $item['youhui_zhekou']}
	            <dl class="fn-clear"><dt>讯都车主：</dt><dd>{$item['youhui_zhekou']}</dd></dl>
	            {/if}
	            {if $item['youhui_tishi']}
	            <dl class="fn-clear"><dt>优惠提示：</dt><dd>{$item['youhui_tishi']}</dd></dl>
	            {/if}
                <dl class="fn-clear"><dt>地址：</dt><dd>{Area::pos($item['areaid'])}<br/>{$item['address']}</dd></dl>
                <dl class="fn-clear"><dt>预订电话：</dt><dd>{if $item[tel1]||$item[tel2]}{$item['tel1']}{if $item['tel1']}<br/>{$item['tel2']}{/if}{else}尚未填写{/if}</dd></dl>
	            {if $item['business']}
	            <dl class="fn-clear"><dt>经营项目：</dt><dd>{$item['business']}</dd></dl>
	            {/if}

                <dl class="fn-clear">
                	<dt>商家状态：</dt>
                	<dd> {Im::web($item[userid])}</dd>
                </dl>
           </div>
        </div>
    	<!--图文说明 end-->
    	<!--详细信息 start-->
        <div class="mt10 fn-clear">
        	<div class="cooper-detail sell-show-detail bd fn-left">
                <div class="hd hd-bg-30">
                    <h3>详细信息</h3>
                </div>
                <div class="fn-clear c666">
                    <div class="cooper-detail-left fn-left">
                    	<dl class="fn-clear">
		                    {$content}
                        </dl>
                    </div>
                </div>
            </div>
	        <div class="cooper-other fn-right">
	        {loop $allItem $k $v}
		        <dl>
			        <dt>{$v['shopname']} {if $v[nickname]}({$v[nickname]}){/if}</dt>
			        <dd>
				        {if $v[tel1] || $v[tel2]}
						电话:{$v[tel1]} {if $v[tel2]}<br/>{$v[tel2]}{/if}<br/>
				        {/if}
				        地址:{$v[address]} <br>
				        {if $v[carstop]}停车位置:{$v[carstop]} <br>{/if}
                        <iframe src="{SITE_URL}api.php?aM=map&aA=coshop&lang={$v[langitude]}&lat={$v[latitude]}&name={urlencode($v[shopname])}{if $v[nickname]}({$v[nickname]}){/if}&phone={urlencode($v[tel1].PHP_EOL.$v[tel2])}&addr={urlencode(Area::pos($v['areaid'], '').$v[address])}" frameborder='0' scrolling="no" width="300" height="250"></iframe>
                        <input class="jsShopName" type="hidden" value="{$v[shopname]}{if $v[nickname]}({$v[nickname]}){/if}">
                        <input class="jsShopPhone" type="hidden" value="{$v[tel1]} {if $v[tel2]}{urlencode('<br/>')}{$v[tel2]}{/if}">
                        <input class="jsShopAddr" type="hidden" value="{Area::pos($v['areaid'])}{$v[address]}">
				        <input class="jsShopPoint" type="hidden"
				            {if $v[langitude] && $v[latitude]}
				            value="{$v[langitude]},{$v[latitude]}"
				            {else}
				            value="{Area::name($v[areaid])}"
				            {/if}
						    >
                        <a class="jsWholeMap" href="javascript:void(0);" onclick="return false">查看全图>></a>
			        </dd>
		        </dl>
	        {/loop}
	        </div>
            <div id="whole-map" class="whole-map">
                <p>地址：<span id="shopAddr"></span></p>
                <a id="iframeUrl" href="{SITE_URL}api.php?aM=map&aA=coshopBig" class="fn-hide"></a>
            </div>
        </div>
    	<!--详细信息 end-->
    </div>
<script type="text/javascript">
    seajs.use(['$','kinslideshow','easyui','easyui-css','easyui-icon-css'],function($){
        $(".sell-show-intro").hover(function(){
            $(this).attr("style","_height:313px;min-height:313px");
        },function(){
            $(this).attr("style","height:313px;overflow:hidden;");
        });
        //滚动图片
        $("#J_Kinslideshow").KinSlideshow({
            moveStyle:"right",
            isHasTitleBar:false,
            titleFont:{ TitleFont_size:12,TitleFont_color:"#FFFFFF",TitleFont_weight:"normal" },
            btn:{ btn_bgColor:"#e9d3ba",btn_bgHoverColor:"#7a2624",btn_fontColor:"#311a00",btn_fontHoverColor:"#FFFFFF",btn_borderColor:"#cccccc",btn_borderHoverColor:"#dcbf9f",btn_borderWidth:1 }
        });

        //地图
        $('#whole-map').dialog({
            title:'全图',
            width:785,
            height:500,
            closed:true
        });
        $('.jsWholeMap').click(function(){
            var addr = $(".jsShopAddr").val(),
                    name = $(".jsShopName").val(),
                    phone = $(".jsShopPhone").val(),
                    point = $(this).siblings('.jsShopPoint').val().split(','),
                    iframeHtml,
                    iframeUrl = $("#iframeUrl").attr("href");
            $('#whole-map').find('#shopAddr').text(addr);
            var paramName = name.length>0 ? "&name="+encodeURI(name) : "",
                    paramPhone = phone.length>0 ? "&phone="+encodeURI(phone) : "",
                    paramAddr = addr.length>0 ? "&addr="+encodeURI(addr) : "",
                    paramPoint = point.length==2 ? '&lang='+point[0]+'&lat='+point[1] : point.length==0 ? "" : '&cityName='+encodeURI(point[0]),
                    param = paramPoint+paramName+paramPhone+paramAddr;
            iframeHtml='<iframe src="'+iframeUrl+param+'" frameborder="0" scrolling="no" width="750" height="400"></iframe>';
            $('#whole-map').find('iframe').remove();
            $(iframeHtml).insertAfter($('#whole-map').find('p'));
            $('#whole-map').dialog({
                closed:false
            });
        });
    })
</script>
    <!--主体部分end-->
    <!--底部start-->
{template 'footer'}